package com.example.venue_reservation_service.controller;

import com.example.venue_reservation_service.dto.PageDTO;
import com.example.venue_reservation_service.service.VenueLogService;
import com.example.venue_reservation_service.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/log")
@CrossOrigin
@Api("日志信息接口")
public class LogController {

    @Resource
    private VenueLogService venueLogService;

    @ApiOperation("查询日志信息")
    @PostMapping("/query")
    public Result query(@RequestBody PageDTO dto, @RequestParam("key") String key){
        return venueLogService.queryLogs(dto, key);
    }

}
